import { useSelector, useDispatch } from 'react-redux';
function View() {
  console.log(useSelector);

  const { num, arr } = useSelector((state: RootState) => ({
    num: state.NumStatusReducer.num,
    arr: state.ArrStatusReducer.exArr,
  }));
  const dispatch = useDispatch();
  const changeNum = () => {
    dispatch({ type: 'test', val: 123 });
  };
  return (
    <div className="home">
      <p>Page1{num}</p>
      <p>Page1{arr}</p>
      <button onClick={changeNum}>按钮</button>
    </div>
  );
}

export default View;
